/**
 * @author WangSong
 * @time 2018年06月22日 16:00
 * @company 文思海辉技术有限公司
 */
package com.pactera.jep.service.sys.dto;

import com.pactera.jep.sys.model.BizType;
import org.apache.commons.collections.CollectionUtils;
import java.util.ArrayList;
import java.util.List;

public class BizTypeDto extends BizType {
    private String id;

    private String title;

    private String parentId;

    private String parentName;

    List<BizTypeDto> children;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public List<BizTypeDto> getChildren() {
        return children;
    }

    public void setChildren(List<BizTypeDto> children) {
        this.children = children;
    }

    public void addChildren(BizTypeDto bizTypeDto) {
        if(CollectionUtils.isEmpty(children)) {
            this.children = new ArrayList<BizTypeDto>();
        }
        this.children.add(bizTypeDto);
    }
}
